//
//  DefineConfig.h
//  JSBasicFramework
//
//  Created by Apple on 2018/8/2.
//  Copyright © 2018年 Apple. All rights reserved.
//

#ifndef DefineConfig_h
#define DefineConfig_h

//MARK:基本URL
#ifdef DEBUG
static const NSString *Base_url = @"";
static const NSString *Base_image_url = @"";
static const BOOL isDebug = YES;
#else
static const NSString *Base_url = @"";
static const NSString *Base_image_url = @"";
static const BOOL isDebug = NO;

#endif

//MARK:通知

//发送通知
#define KPostNotification(name,obj) [[NSNotificationCenter defaultCenter] postNotificationName:name object:obj];


//MARK:数据验证
#define StrValid(f) (f!=nil && [f isKindOfClass:[NSString class]] && ![f isEqualToString:@""])
#define SafeStr(f) (StrValid(f) ? f:@"")
#define HasString(str,key) ([str rangeOfString:key].location!=NSNotFound)

#define ValidStr(f) StrValid(f)
#define ValidDict(f) (f!=nil && [f isKindOfClass:[NSDictionary class]])
#define ValidArray(f) (f!=nil && [f isKindOfClass:[NSArray class]] && [f count]>0)
#define ValidNum(f) (f!=nil && [f isKindOfClass:[NSNumber class]])
#define ValidClass(f,cls) (f!=nil && [f isKindOfClass:[cls class]])
#define ValidData(f) (f!=nil && [f isKindOfClass:[NSData class]])

#define kPlaceHolderAvatar UIImageMake(@"userIcon")
#define kPlaceHolderImage UIImageMake(@"userIcon")

#define UIPingFangFontMakeSize(size) [UIFont fontWithName:@"PingFangSC-Regular" size:size]

#endif /* DefineConfig_h */
